<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <ul>
        <li>xxxx</li>
        <li>xxxx</li>
        <li>xxxx</li>
        <li>xxxx</li>
        <li>xxxx</li>
    </ul>
    <script>
        // 把子节点的事件都委托给父节点 利用事件冒泡影响子节点
       var ul1 =  document.getElementsByTagName('ul');
       ul1[0].addEventListener('click',function(e){
            e.target.style.backgroundColor = 'pink'
       })
    </script>
</body>
</html>